/* model */
import { IMMessageTypeEnum } from "@src/modules/im/imChat/model"

type IMMessageContent = {
  // 文本内容
  msg: string;
  // 类型
  type: string;
  // 自定义事件类型
  customEvent: string;
  // 自定义事件属性
  customExts: Record<string, any>;
}

type IMChatMessage = {
  conversationId: string;
  createTime: number;
  createTimestamp: number;
  customerServiceHead: string | null;
  customerServiceName: string | null;
  customerServiceNameLanguage: string | null;
  customerServiceNumber: string | null;
  id: number;
  imId: string | null;
  messageContent: IMMessageContent;
  msg: string;
  roomType: boolean;
  messageType: IMMessageTypeEnum
  messageVisibility: number;
  relationUserId: string | null;
  sendType: number;
  status: number;
  tenantId: string;
  updateTime: number | null;
  isHistoryConversation: boolean;
}

export type {
  IMChatMessage,
  IMMessageContent
}